package com.cat.conf.startup;

// import com.jaws.core.common.log.Log;
// import com.jaws.core.compatible.dao.impl.SequenceDaoImpl;
// import com.jaws.core.compatible.enums.SequenceStrategy;
// import lombok.extern.slf4j.Slf4j;
// import org.assertj.core.util.Lists;
import org.springframework.boot.CommandLineRunner;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;
import java.util.List;

/**
 * SequenceDao unlock 语句被 Druid 拦截，需要提前初始化
 * 用户模块的sys_sequence目前只用到ENTERPRISE因此写死这些枚举
 *
 * @author yejc
 * @date 2018-07-30
 * @since v1.0.0
 */
@Component
// @Slf4j
public class DemoStartUp implements CommandLineRunner {

	// @Resource(name = "sequenceDao")
	// private SequenceDaoImpl sequenceDaoImpl;

	@Override
	public void run(String... args) {
		// List<String> tables = Lists.newArrayList(SequenceStrategy.ENTERPRISE.getKey());
		// sequenceDaoImpl.initTable(tables);
		// log.info(Log.op("CommonIdStartUp.run").msg("SequenceDaoImpl init finish").toString());
	}
}
